package com.ywk.miaohsa.dao;

import com.ywk.miaohsa.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;


@Mapper
public interface UserDao {

    @Insert("insert into user(phone_num,password) values(#{phoneNum},#{password})")// 一般通过#{}的方式，${}会有sql注入的问题
    public int insert(User user);

    @Update("update user set password=#{password} where phone_num=#{phoneNum}")
    int modifyPsw(User user);

}
